﻿using System;
using System.Collections.Generic;
using Autodesk.Revit.DB;
using YJKRevitKernel.ElementSearchUtility.LinkDocumentSuite;
using YJKPatternSign.StairsRoomSection.DataDefine;
using YJKPatternSign.StairsRoomSection.Kit;
using YJKPatternSign.StairsRoomSection.Kit.CutLine;

namespace YJKPatternSign.StairsRoomSection.ElementPacket
{
	public abstract class ElementObject
	{
		public List<ElementObject> LstChildObj
		{
			get
			{
				return this.m_lstChildObj;
			}
			set
			{
				this.m_lstChildObj = value;
			}
		}

		public BaseLinkDocumentResultBean SelfElem
		{
			get
			{
				return this.m_LinkElem;
			}
		}

		public SectionViewData SecViewData
		{
			get
			{
				return this.m_secviewData;
			}
		}

		public ElementObject(BaseLinkDocumentResultBean LinkElem, SectionViewData secviewData = null)
		{
			this.m_strMaterial = "无";
			this.m_objectType = ObjectType.kUnknow;
			this.m_LinkElem = LinkElem;
			this.m_secviewData = secviewData;
		}

		public Transform GetLinkTran()
		{
			return this.m_LinkElem.GetTotalTransform();
		}

		public virtual List<ElementObject> DividChild()
		{
			CutLineGetter cutLineBehavior = new CutLineGetter();
			this.SetCutLineBehavior(cutLineBehavior);
			this.m_lstChildObj = new List<ElementObject>();
			return this.m_lstChildObj;
		}

		public bool GetCutLines()
		{
			this.m_cutLineBehavior.GetCutLines(this.m_secviewData, this);
			return false;
		}

		public void SetCutLineBehavior(CutLineGetter CutLineObj)
		{
			this.m_cutLineBehavior = CutLineObj;
		}

		public virtual void GetMaterial()
		{
		}

		public ObjectType m_objectType;

		public string m_strMaterial;

		public List<Curve> m_lstCutLine = new List<Curve>();

		private BaseLinkDocumentResultBean m_LinkElem;

		private List<ElementObject> m_lstChildObj = new List<ElementObject>();

		private SectionViewData m_secviewData;

		private CutLineGetter m_cutLineBehavior;
	}
}
